import { get, post } from '../utils/request'
// var resize = '?x-oss-process=image/auto-orient,1/resize,m_fill,w_1500'
var resize = '?x-oss-process=image/auto-orient,1/resize,m_lfit,w_1500'
import store from '@/store/'
// 图片上传2
export const uploadImg2 = (img) => {
  return post('/cloud-resource/resource/oss/put-file-b64', {
    img,
    name: 'signature.png',
    tenantId: store.state.user.userInfo.tenantId,
  })
}

export const signUrl = (img,equipId,token) => {
  return post('/cloud-equip/depositPay/upload/signUrl', {
    url:img,
    equipId,
    token
  })
}

// 图片上传
export const uploadImg = (file) => {
  return post('/cloud-resource/oss/endpoint/put-file-water-comp', file)
}

// 营业执照OCR
export const bizLicenseOcr = (imageUrlStr) => {
  var imageUrlStr = imageUrlStr + resize
  return post('/cloud-resource/ocr/endpoint/bizLicenseOcr', {
    imageUrlStr,
  })
}

// 银行卡正面OCR
export const bankFontOcr = (imageUrlStr) => {
  var imageUrlStr = imageUrlStr + resize
  return post('/cloud-resource/ocr/endpoint/bankCardOcr', {
    imageUrlStr,
  })
}

// 身份证OCR
export const idCardOcr = (imageUrlStr) => {
  var imageUrlStr = imageUrlStr + resize
  return post('/cloud-resource/ocr/endpoint/idCardOcr', {
    imageUrlStr,
  })
}
